package openbang.account.service.vo;

/**
 * 消息状态定义 : 待确认（待审批），已确认，作废, 未阅读、已阅读、已存档
 * 
 * @author aibo zeng
 *
 */

public enum MsgStatusEnum {
	PENDING_SEND (0,"待发送"),
	HAS_SEND (10,"已发送"),
	PENDING_READ (20,"待阅读"),
	HAS_READ (30,"已阅读"),
	HAS_ARCHIVE (40,"已存档"),
	DELETE(99,"作废状态");


	private Integer code;
	private String desc;
	
	private MsgStatusEnum(Integer code,String desc) {
		this.code = code;
		this.desc = desc;
	}
	public int getCode() {
		return code;
	}
	public String getDesc(){
		return desc;
	}
	
	public static String getDesc(Integer code) {
		for(MsgStatusEnum each : MsgStatusEnum.values()) {
			if(each.getCode()==code)
				return each.getDesc();
		}		
		return "";
	}
}
